from tortoise import models, fields

class RoleGroup(models.Model):
    groupid = fields.CharField(max_length=36, null=False, description="角色id", pk=True)
    groupname = fields.CharField(max_length=36, null=True, description="角色名称")
    description = fields.CharField(max_length=136, null=False, description="描述")

    def getJson(self):
        return {
            'groupid': self.groupid,
            'groupname': self.groupname,
            'description': self.description
        }
